//
//  PlaceAnnotation.m
//  Places
//
//  Created by alex on 9/20/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "PlaceAnnotation.h"


@implementation PlaceAnnotation

#pragma mark 
#pragma mark properties

@synthesize place;
@dynamic coordinate;

- (CLLocationCoordinate2D) coordinate {
	CLLocationCoordinate2D coord;
	coord.latitude = [place.latitude doubleValue];
	coord.longitude = [place.longitude doubleValue];
	return coord; 
}

#pragma mark 
#pragma mark initialization

- (PlaceAnnotation *)initWithPlaceData:(PlaceData *)newPlace {
	place = [newPlace retain];

	return self;
}

#pragma mark 
#pragma mark accessing title and subtitle

- (NSString *)title {
	return place.title;
}

- (NSString *)subtitle {
	return place.subtitle;
}

#pragma mark 
#pragma mark dealloc

- (void)dealloc {
	[place release];
	[super dealloc];
}

@end

